<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-type" content="text/html; charset=utf-8">
	<title>_TimePicker DOH Test</title>

	<script type="text/javascript" src="boilerplate.js"></script>

	<script type="text/javascript">
		require([
			"doh/runner",
			"dojo/_base/declare",
			"dijit/_TimePicker",
			"dojo/domReady!"
		], function(doh, declare, _TimePicker){

			doh.register("tests", [
				function extended_range(){
					var t1 = _TimePicker({}, "t1");
					t1.set('value', new Date("December 11, 2011 00:09:30"));
					doh.is(96, t1.timeMenu.children.length, 'num entries 1');
				},
				function constraints17250(){
					var tp = new (declare(_TimePicker, {
						isDisabledDate: function () {
							return this.inherited(arguments);
						}
					}))();

					tp.set('constraints', {
						constructor: null,
						clickableIncrement: 'T01:00:00',
						set: function () {
							throw new Error('Wrong set called');
						}
					});

					tp.set('value', new Date());
					doh.is(24, tp.timeMenu.children.length, 'Increment constraints should be copied but other non-constraint properties should not');
				}
			]);

			doh.run();
		});
	</script>

</head>
<body>
	<h1 class="testTitle">dijit._TimePicker automated tests (non-robot)</h1>
	
	<label for="t1">t1:</label>
	<div id="t1" style="height: 200px; width: 150px; overflow: auto;"></div>
</body>
</html>
